<template>
  <FixedBottom class="FixedBottom_andbtn">
    <div class="FixedBottom_andbtn-left">
      <slot></slot>
    </div>
    <nut-button shape="square" type="danger" @click="$emit('confirm')">{{ btnText }}</nut-button>
  </FixedBottom>
</template>

<script lang="ts" setup>
import FixedBottom from './FixedBottom.vue'
withDefaults(
  defineProps<{
    btnText?: string
  }>(),
  {
    btnText: '确认',
  },
)

defineEmits<{
  (e: 'confirm'): void
}>()
</script>

<style lang="scss">
.FixedBottom_andbtn {
  // padding: 8px;
  display: flex;

  .nut-button {
    width: 120px;
    height: 100%;
    // border-radius: 0;
  }
}

.FixedBottom_andbtn-left {
  flex: 1;
  // line-height: 34px;
}
</style>
